<html lang="zh-cn">{include file="index/meta" /}
    
    <body class="body">
        <div>
            <div class="common-layout min-w-[1200px]">
                <section class="el-container w-100 h-screen">
                    <!--侧边栏开始-->
                    {include file="index/main" /}
                    <!--侧边栏结束-->
                    <section class="el-container is-vertical">
                        <!--顶部-->
                        {include file="index/header" /}
                        <!--顶部结束-->
                        <main class="el-main main-wrap h-full p-0">
                            <div class="el-scrollbar">
                                <div class="el-scrollbar__wrap el-scrollbar__wrap--hidden-default">
                                    <div class="el-scrollbar__view" style="">
                                        <div class="p-[10px]">
                                            <div class="main-container">
                                              <div class="el-card is-never-shadow box-card !border-none">
                                                    <div class="el-card__body" style="">
                                                        <div class="flex justify-between items-center">
                                                            <span class="text-[20px]">{:getmenuname($Request.controller)}</span>
                                                            <button data-height="340" data-class="modal-dialog-centered" data-toggle="RefreshModal" data-remote="{:url('add')}" class="el-button el-button--primary w-[100px]"  type="submit">添加广告</button>
                                                            </div>
                                                        <div class="mt-[20px]">
                                                            <div class="el-table--fit  el-table ">
                                                                <div class="el-table__inner-wrapper">
                                                                    <div class="el-table__header-wrapper">
                                                                        <table class="el-table__header">
                                                                            <thead>
                                                                                <tr class="text-c">
                                                                                <th>名称</th>
                                                                                <th>类型</th>
                                                                                <th>链接地址</th>
                                                                                <th>描述</th>
                                                                                <th>状态</th>
                                                                                <th>添加时间</th>
                                                                                <th>管理操作</th></tr>
                                                                            </thead>
                                                                            <tbody>
                                                                                 {volist name="list" id="data"}
                                                                                <tr class="text-d">
                                                                                    <td>{$data.title}</td>
                                                                                    <td>{if $data.type}图片链接{else}文字链接{/if}</td>
                                                                                    <td><a href="{$data.url}" target="_blank">{$data.url}</a></td>
                                                                                    <td>{$data.describe}</td>
                                                                                    <td>{$data.end_time==0 ||$data.end_time>time() ? '<span class="el-tag">正常</span>': '<span class="el-tag el-tag--danger">已过期</span>'}</td>
                                                                                    <td>{:date("Y-m-d H:i:s",$data.inputtime)}</td>
                                                                                     <td>
                                                                                <button data-height="340" data-class="modal-dialog-centered" data-toggle="RefreshModal" data-remote="{:url('edit',['id'=>$data.id])}"  type="button" class="el-button--mini el-button el-button--primary">编辑</button>
                                                                            <button onclick="post_del(this,'{:url('del',['id'=>$data.id])}','确定要删除吗？')"  type="button" class="el-button--mini el-button el-button--danger ">删除</button></td>
                                                                                   </tr>
                                                                                {/volist}
                                                                                
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                              
                                            </div>
                                           
                                        </div>
                                       {$list|raw}
                                    </div>
                                </div>
                            </div>
                        </main>
                    </section>
                </section>
            </div>
        </div>{include file="index/footer" /}</body>

</html>